import 'dart:io';

import 'package:url_launcher/url_launcher.dart';

class CheckVersion {
   static void jump(Function func) async {
    if (Platform.isIOS) {
      String url = 'itms-apps://itunes.apple.com/cn/app/id414478124?mt=8';
      if (await canLaunch(url)) {
        await launch(url);
        func('ios');
      } else {
        throw 'Could not launch $url';
      }
    } else {
      func('android');
    }
  }
}
